<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="js/jquery.form.min.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function(){
	//$('#upload').bind('change',subFrm);
	
	$("#pathbtn").click(function(){
		var postData = {filePath:$("#srcPath").val()};
		$.ajax({
			type:'post',
			dataType:'json',
			data: postData,
			url:'getPath.do',
			success:function(result){
			}
		})
	});
	$("#generateXml").click(function(){
		$.ajax({
			type:'post',
			dataType:'json',
			url:'generate.do',
			success:function(result){
			}
		})
	});
	$("#recombine").click(function(){
		$.ajax({
			type:'post',
			dataType:'json',
			url:'recombine.do',
			success:function(){
				
			}
		})
	});
}
	
/*
function subFrm(){
var options = {
    dataType: 'json',
   	iframe:	false,
    success:function(data){
	console.log(data);
		if(data.fileid == 0 || data.fileid == undefined){
    		alert("sdFile upload failed!");
    		//window.location = window.location;
      	}else{
      		//window.location.href = foxit.common.path + "/LoadReader.do?fileid="+data.fileid;
      	}
  		},
  		error:function(data){
  			alert("asFile upload failed!");
  			//window.location = window.location;
  		}
};

	$('#frm').attr("action","http://localhost:8080/PDF2PDFTester" + "/Upload.do");
	$('#frm').ajaxSubmit(options);
}
*/
</script>

<script type="text/javascript">
</script>
</head>
<body>
	<!-- <form enctype="multipart/form-data"  id="frm" name="frm" method="post" >
		<input type="file" id="upload" class="upload" name="upload">
	</form>
	<input type="button" name="recombine" value="recombine" id="recombine"/>
	
	 -->
	<br />
	<p>
		<label> Enter Your Source PDFs:   </label>
		<input id="srcPath" type="text">
		<input id="pathbtn" type="button" value="提交">
	</p>
	
	<div id="output">
		<label>Totle Files: </label>
		<label id="totlefile">0 </label>
		<br />
		<label>Current File: </label>
		<label id="filename">0 </label>
		<br />
		<label>Current Page: </label>
		<label id="page">0 </label>
		<br />
		<label>Current Paragraph: </label>
		<label id="paragraph">0 </label>
	</div>	
	<br />
	<div>
		<input id="generateXml" type="button" value="GenerateXml">
		<input id="recombine" type="button" value="RecombinePDF">
	</div>
</body>
</html>